@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_mixins.less";

// pc
.teamwork {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;

  .descContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    padding-right: 24px;

    .desc {
      font-size: 14px;
      color: var(--secondLevelText);
    }

    .viewDetails {
      margin-left: 9px;
      text-decoration: underline;
      cursor: pointer;
    }

    .permissionSettingBtn {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      font-size: 14px;
      font-weight: bold;
      color: var(--primaryColor);
      cursor: pointer;

      &.disable {
        color: var(--bgBrandDisabled);
        cursor: not-allowed;

        svg {
          fill: var(--bgBrandDisabled);
        }
      }

      svg {
        width: 16px;
        height: 16px;
        fill: var(--primaryColor);
        margin-left: 4px;
      }
    }
  }

  .memberList {
    flex: 1;
    margin-top: 16px;
    padding-right: 12px;
    overflow-x: hidden;
    overflow-y: scroll;
  }

  .inviteContainer {
    flex-shrink: 0;
    padding-top: 24px;
    margin-right: 24px;
    border-top: 1px solid var(--lineColor);

    .label {
      font-size: 14px;
      color: var(--firstLevelText);
      padding-bottom: 8px;
    }

    .invite {
      display: flex;
      align-items: center;
    }

    .inputContainer {
      position: relative;
      display: flex;
      align-items: center;
      flex: 1;
      margin-right: 24px;

      .input {
        flex: 1;
        padding-right: 175px;
      }

      .teamTreeSelect {
        position: absolute;
        right: 0;
        max-width: 166px;
        flex-shrink: 0;

        :global {
          .ant-select-selector {
            border: none;
            border-radius: 0;
            padding: 0;
            background: transparent;

            &::before {
              position: absolute;
              top: 12px;
              left: -8px;
              display: block;
              content: "";
              width: 2px;
              height: 16px;
              background: var(--lineColor);
            }
          }

          .ant-select-selection-placeholder {
            color: var(--secondLevelText);
            opacity: 1;
            line-height: 40px;
          }

          .ant-select-selection-placeholder,
          .ant-select-selection-item {
            text-align: right;
            padding-right: 28px;
          }

          .ant-select-arrow {
            width: 16px;
            height: 16px;
            top: 48%;
            right: 8px;

            svg {
              height: 100%;
              width: 100%;
              fill: var(--secondLevelText);
            }
          }
        }
      }
    }
  }

  .jumpBtn {
    width: fit-content;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--thirdLevelText);
    margin-top: 24px;
    cursor: pointer;

    svg {
      width: 16px;
      height: 16px;
      fill: var(--thirdLevelText);
      margin-right: 4px;
    }
  }
}

// Mobile
.mobileTeamwork {
  .descContainer,
  .memberList {
    padding-right: 0;
  }

  .inviteContainer {
    padding-top: 16px;
    margin-right: 0;

    .inputContainer {
      width: 100%;
      margin-right: 0;
      margin-bottom: 16px;

      .teamTreeSelect {
        max-width: 120px;
      }
    }

    .label {
      padding-bottom: 16px;
    }

    .invite {
      flex-direction: column;
    }

    .input {
      padding-right: 130px !important;
    }
  }

  .jumpBtn {
    width: unset;
    justify-content: center;
  }
}
